#include "common.h"

#define THRESHOLD 0x3f
#define MAX_GRAY 256
#define WIN_SIZE 10

#define K 0.1

Image readImage(int h, int w);
Image getGrayLevel(unsigned long** bmpPix, int h, int w);

Image binarizeImage(Image input);
int checkBinImage(Image first, Image second);
Image binarizeGrayImageKmeans(Image grayImg);
Image filterImage(Image input);

void smoothImage(Image input);
Image slantRemoval(Image input, int slantDeg);
Image scaleImage(Image input, int h, int w);
Image contourFinding(Image input);
Image lineSkewCorrection(Image input) ;
void thinImageOnMatch(Image input);
void skeletonImage(Image input, Image skeleton);
void smoothContour(Image input);
